/*
 * @Author: LVGRAPE
 * @Date: 2024-03-11 15:10:36
 * @LastEditTime: 2025-05-27 10:23:18
 * @LastEditors: LVGRAPE
 * @Description:
 * @FilePath: \zino-fc-v4\arduino\arduino.c
 * 要啥没啥，爱咋咋的
 */
#if defined(ARDUINO)

#include "arduino.h"
#include "rtthread.h"

void RT_triger_handle(void)
{
  // pro_drone_flipMode(2);
  // pro_drone_land();
  // pro_drone_ctrl(100, 0, 0, 0);
  // pro_drone_ctrl(0, 100, 0, 0);
  pro_drone_ctrl(0, -100, 0, 0);
  // pro_drone_ctrl(-100, 0, 0, 0);

}
void LT_triger_handle(void)
{
  // pro_drone_takeoff();
  // pro_drone_ctrl(100, 0, 0, 0);
  // delay(3000);
  pro_drone_ctrl(0, 100, 0, 0);
  // pro_drone_ctrl(0, -100, 0, 0);
  // pro_drone_ctrl(0, 0, 50, 0);
  // pro_drone_ctrl(0, 0, -50, 0);
  // pro_drone_ctrl(0, 0, 0, 90);
  // pro_drone_ctrl(0, 0, 0, -90);
  // pro_drone_flipMode(1);
  // delay(1000);
  // pro_drone_land();
  // pro_drone_flipMode(1);
}
void setup()
{
  // pro_event_send_enable();
}

void loop()
{
  rt_kprintf("loop\n");
  // while (true) {
  // rt_kprintf("while: %d\t",is_rc_key_down(MIXLY_RC_RT));
  // rt_kprintf(" : %d\n",is_rc_key_down(MIXLY_RC_LT));
  // if(is_rc_key_down(MIXLY_RC_RT) ==1)
  // {
  //     pro_drone_takeoff();
  // pro_drone_ctrl(-10,0,0,0);
  // pro_drone_ctrl(10,0,0,0);
  // pro_drone_ctrl(0,10,0,0);
  // pro_drone_ctrl(0,-10,0,0);
  // pro_drone_ctrl(0,0,10,0);
  // pro_drone_ctrl(0,0,-10,0);
  // pro_drone_flipMode(1);
  // delay(1000);
  // pro_drone_land();

  // }
  // if(is_rc_key_down(MIXLY_RC_LT) ==1)
  // {
  // pro_drone_takeoff();
  // pro_drone_ctrl(-10,0,0,0);
  // pro_drone_ctrl(10,0,0,0);
  // pro_drone_ctrl(0,10,0,0);
  // pro_drone_ctrl(0,-10,0,0);
  // pro_drone_ctrl(0,0,10,0);
  // pro_drone_ctrl(0,0,-10,0);
  // pro_drone_flipMode(2);
  // delay(1000);
  // pro_drone_land();

  // }
  // delay(10);
  // }
}

#endif
